<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>

    <title>悦章科技机构平台</title>
    <script src="/Public/static/jquery-2.0.3.min.js"></script>
    <script src="/Public/static/layer/layer.js"></script>
    <!--内容样式-->
    <link rel="stylesheet" href="__PUBLIC__/Home/css/style.css" />
    <link rel="stylesheet" href="__PUBLIC__/Home/css/page.css" />

</head>

<body>


<div class="main">


    <!--  头部  -->
    <include file="menu" />

    <!--  右侧内容  -->
    <div class="content">


        <div class= "ct-title">
            <div class="ctt-l">
                <a onclick="rankingList('')" <if condition="$rank_type eq ''">class="cttl-btn cttl-on"<else/>class="cttl-btn"</if>>营业额排行</a>
                <a onclick="rankingList('1')" <if condition="$rank_type eq '1'">class="cttl-btn cttl-on"<else/>class="cttl-btn"</if>>报名数排行</a>
                <a onclick="rankingList('2')" <if condition="$rank_type eq '2'">class="cttl-btn cttl-on"<else/>class="cttl-btn"</if>>联系数排行</a>
                <div class="divclear"></div>
            </div>
            <div class="ctt-r">
                <form class="cttr-bd" action="{:U('Home/Index/rankingList')}" method="post">
                    <input type="hidden" name="rank_type" value="{$rank_type}"/>
                    <input type="text" class="cttrb-wb" placeholder="请输入名称" name="name" value="{$name}">
                    <div class="cttrb-sj">
                        <input type="date" value="{$start_time}" name="start_time">
                        <img src="__PUBLIC__/Home/images/img_zhi.png" />
                        <input type="date" value="{$end_time}" name="end_time">
                        <div class="divclear"></div>
                    </div>
                    <button class="cttrb-cx">查询</button>
                    <div class="divclear"></div>
                </form>
                <div class="divclear"></div>
            </div>
            <div class="divclear"></div>
        </div>


        <!-- 营业额排行 -->
        <div <if condition="$rank_type eq ''">style="display: block;"<else/>style="display: none;"</if> id="yy_rank">
            <div class="ct-table">
                <table width="100%" border="0">
                    <tbody>
                    <tr>
                        <th scope="col" width="10%" style="border-top-left-radius: 10px;">排行名次</th>
                        <th scope="col" width="20%">ID</th>
                        <th scope="col" width="30%">姓名</th>
                        <th scope="col" width="40%" style="border-top-right-radius: 10px;">缴费金额</th>
                    </tr>
                    <volist name="_list" id="vo" key="key">
                        <tr>
                            <td>{$key}</td>
                            <td>{$vo.id}</td>
                            <td>{$vo.username}</td>
                            <td>￥{$vo.pay_price}</td>
                        </tr>
                    </volist>
                    </tbody>
                </table>
            </div>

            <div class="page">
                {$_page}
            </div>
        </div>
        <!-- 营业额排行 -->


        <!-- 报名数排行 -->
        <div <if condition="$rank_type eq '1'">style="display: block;"<else/>style="display: none;"</if> id="bm_rank">

            <div class="gjjl-tj" style="margin-top: 20px;">
                <div class="gt-box">
                    <h3>{$live}</h3>
                    <span>直播课学员总数</span>
                </div>
                <div class="gt-box">
                    <h3>{$video}</h3>
                    <span>点播课学员总数</span>
                </div>
                <div class="gt-box">
                    <h3>{$face}</h3>
                    <span>面授课学员总数</span>
                </div>
                <div class="divclear"></div>
            </div>

            <div class="ct-table">
                <table width="100%" border="0">
                    <tbody>
                    <tr>
                        <th scope="col" width="10%" style="border-top-left-radius: 10px;">排行名次</th>
                        <th scope="col" width="10%">ID</th>
                        <th scope="col" width="20%">姓名</th>
                        <th scope="col" width="15%">总数</th>
                        <th scope="col" width="15%">直播课学员总数</th>
                        <th scope="col" width="15%">点播课学员总数</th>
                        <th scope="col" width="15%" style="border-top-right-radius: 10px;">面授课学员总数</th>
                    </tr>
                    <volist name="_list" id="vo" key="key">
                        <tr>
                            <td>{$key}</td>
                            <td>{$vo.id}</td>
                            <td>{$vo.username}</td>
                            <td>{$vo.total}</td>
                            <td>{$vo.live}</td>
                            <td>{$vo.video}</td>
                            <td>{$vo.face}</td>
                        </tr>
                    </volist>
                    </tbody>
                </table>
            </div>

            <div class="page">
                {$_page}
            </div>
        </div>
        <!-- 报名数排行 -->


        <!-- 联系数排行 -->
        <div <if condition="$rank_type eq '2'">style="display: block;"<else/>style="display: none;"</if> id="lx_rank">

            <div class="gjjl-tj" style="margin-top: 20px;">
                <div class="gt-box">
                    <h3>{$gj_customer}/{$customer_count}</h3>
                    <span>联系客户</span>
                </div>
                <div class="gt-box">
                    <h3>{$gj_clue}/{$clue_count}</h3>
                    <span>联系线索</span>
                </div>
                <div class="gt-box">
                    <h3>{$gj_total}/{$total}</h3>
                    <span>总数</span>
                </div>
                <div class="divclear"></div>
            </div>

            <div class="ct-table">
                <table width="100%" border="0">
                    <tbody>
                    <tr>
                        <th scope="col" width="10%" style="border-top-left-radius: 10px;">排行名次</th>
                        <th scope="col" width="10%">ID</th>
                        <th scope="col" width="20%">姓名</th>
                        <th scope="col" width="20%">联系客户</th>
                        <th scope="col" width="20%">联系线索</th>
                        <th scope="col" width="20%" style="border-top-right-radius: 10px;">联系总数</th>
                    </tr>
                    <volist name="_list" id="vo" key="key">
                        <tr>
                            <td>{$key}</td>
                            <td>{$vo.uid}</td>
                            <td>{$vo.username}</td>
                            <td>{$vo.customer}/{$vo.customer_count}</td>
                            <td>{$vo.clue}/{$vo.clue_count}</td>
                            <td>{$vo.total_contact_number}/{$vo.total_count}</td>
                        </tr>
                    </volist>
                    </tbody>
                </table>
            </div>

            <div class="page">
                {$_page}
            </div>
        </div>
        <!-- 联系数排行 -->
    </div>
</div>
</body>
<script type="text/javascript">
    function rankingList(rank_type)
    {
        if(rank_type == '1'){
            $("#yy_rank").hide();
            $("#lx_rank").hide();
            $("#bm_rank").show();
        }else if(rank_type == '2'){
            $("#bm_rank").hide();
            $("#yy_rank").hide();
            $("#lx_rank").show();
        }else {
            $("#bm_rank").hide();
            $("#lx_rank").hide();
            $("#yy_rank").show();
        }
        var url = "{:U('Home/Index/rankingList')}";
        url = url+"&rank_type="+rank_type;
        location.href = url;
    }
</script>
</html>
